#include <iostream>
#include <vector>
#include <algorithm>


using namespace std;


signed main() {
    int num;
    scanf("%d", &num);
    vector<int> M1(num, 4);
    vector<int> M2(vector<int>(4, num), vector<int> (num, 4));

    for (auto i : M1) {
        cout << i << ' ';
    }
    for (auto i : M2) {
        cout << i << ' ';
    }
    system("pause");

    return 0;
}